package com.ddh.service.enum_;

public enum ResultCode {
    SUCCESS(200, "操作成功"),
    FAIL(500, "操作失败"),
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    USERNAME_AND_PWDERROR(10000,"用户名或密码错误"),
    USERNAME_EXISTS(10001,"用户名已存在"),
    USERNAME_NOT_EXISTS(10002,"用户名不存在"),
    ;




    private final int code;
    private final String message;

    ResultCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}